import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '发放批次',
    align: "center",
    dataIndex: 'grantId'
  },
  {
    title: '身份证号码',
    align: "center",
    dataIndex: 'peopleId'
  },
  {
    title: '征拆户',
    align: "center",
    dataIndex: 'peopleName_dictText'
  },
  {
    title: '预算明细',
    align: "center",
    dataIndex: 'budgetDetailId'
  },
  {
    title: '补偿款类型',
    align: "center",
    dataIndex: 'chargeTypeId_dictText'
  },
  {
    title: '预算总额',
    align: "center",
    dataIndex: 'realCharge'
  },
  {
    title: '已发总额',
    align: "center",
    dataIndex: 'grantedCharge'
  },
  {
    title: '本次发放',
    align: "center",
    dataIndex: 'charge'
  },
  {
    title: '欠发金额',
    align: "center",
    dataIndex: 'budtCharge'
  },
  {
    title: '发放说明',
    align: "center",
    dataIndex: 'notes'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '发放批次',
    field: 'grantId',
    component: 'Input',
  },
  {
    label: '身份证号码',
    field: 'peopleId',
    component: 'Input',
  },
  {
    label: '征拆户',
    field: 'peopleName',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "people,name,name"
    },
  },
  {
    label: '预算明细',
    field: 'budgetDetailId',
    component: 'Input',
  },
  {
    label: '补偿款类型',
    field: 'chargeTypeId',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "charge_type_id"
    },
  },
  {
    label: '预算总额',
    field: 'realCharge',
    component: 'Input',
  },
  {
    label: '已发总额',
    field: 'grantedCharge',
    component: 'Input',
  },
  {
    label: '本次发放',
    field: 'charge',
    component: 'Input',
  },
  {
    label: '欠发金额',
    field: 'budtCharge',
    component: 'Input',
  },
  {
    label: '发放说明',
    field: 'notes',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
